<form id="edit-form" class="form-horizontal" role="form" data-toggle="validator" method="POST" enctype="multipart/form-data">
    <!-- 课程名称 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Title')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="title" class="form-control" name="row[title]" type="text" placeholder="{:__('Title')}" data-rule="required" required value="{$subject.title}" />
        </div>
    </div>

    <!-- 课程价格 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Price')}:</label>
        <div class="col-xs-12 col-sm-8">
            <input id="price" class="form-control" name="row[price]" type="number" placeholder="{:__('Price')}" data-rule="required" required value="{$subject.price}" />
        </div>
    </div>

    <!-- 课程描述 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Content')}:</label>
        <div class="col-xs-12 col-sm-8">
            <textarea id="content" class="form-control editor" rows="5" name="row[content]" cols="50" placeholder="{:__('Content')}" data-rule="required">{$subject.content}</textarea>
        </div>
    </div>

    <!-- 所属分类 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Cateid')}:</label>
        <div class="col-xs-12 col-sm-8">
            {$catelist}
        </div>
    </div>
    
    <!-- 图片上传 -->
    <div class="form-group">
        <label class="control-label col-xs-12 col-sm-2">{:__('Thumbs')}:</label>
        <div class="col-xs-12 col-sm-8">
            <div class="input-group">
                <!-- 上传成功后，文件路径的输入框 -->
                <input id="thumbs" readonly class="form-control" name="row[thumbs]" type="text" value="{$subject.thumbs}" style="display:none;" />

                <!-- 上传按钮 -->
                <div class="input-group-addon no-border no-padding">
                    <span>
                        <button type="button" id="plupload-thumb" class="btn btn-danger plupload" data-input-id="thumbs" data-mimetype="image/gif,image/jpeg,image/png,image/jpg,image/bmp" data-multiple="false" data-preview-id="preview">
                            <i class="fa fa-upload"></i> {:__('Upload')}
                        </button>
                    </span>
                </div>

                <span class="msg-box n-right"></span>
            </div>
            
            <!-- 预览容器 -->
            <ul class="row list-inline plupload-preview" id="preview"></ul>
        </div>
    </div>

    <div class="form-group layer-footer">
        <label class="control-label col-xs-12 col-sm-2"></label>
        <div class="col-xs-12 col-sm-8">
            <button type="submit" class="btn btn-primary btn-embossed disabled">{:__('OK')}</button>
            <button type="reset" class="btn btn-default btn-embossed">{:__('Reset')}</button>
        </div>
    </div>
</form>
